<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCustomersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('customers', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name',50)->default('')->comment('客户名称');
            $table->string('phone',20)->default('')->comment('联系电话号码');
            $table->string('address',200)->default('')->comment('地址');
            $table->string('remarks',255)->default('')->comment('备注');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `customers` comment '客户表'");

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('customers');
    }
}
